Use CAN Bus to Simplify 3D Printer Wiring | Hacker Day

2021-12-13 20:06:39 By : Ms. Sina Lee

[mark] There is an interesting idea when looking at all the wiring of a typical 3D printer; use the CAN bus. There are a lot of wires going into the extruder assembly, and in most designs, this thing flies around at a fairly fast speed. You have the connection to power the heater, the fan power, the four wires for the extruder motor, and the thermistor sensor wires. you understood. Lots of wires. To make matters worse, they all move with the shaft. If either end fails due to poor strain relief, or the conductor itself breaks, various interesting failures can occur. If the hot-end thermistor connection is open, damage usually does not occur, but the temperature control will fail and your printing will fail.

Now, if you push the electronic equipment required to drive and control the extruder directly onto the moving body itself and connect it to the main printer electronic equipment through the CAN bus, you can complete the entire mobile interconnection with four insignificant wires. Yes, you need another PCB component, so it increases the cost, but it is also only the electronic equipment of the control end, so some cost can be saved. [mark] The CAN bus is used because it can be used in modern microcontrollers, and because of its automotive and industrial heritage, its design is robust. This is quite obvious when you think about it, and we are not sure why we have rarely seen it before.

If you want to dive into the details, the GitHub project has ready schematics and code.

Duet3D's Duet 3 ecosystem has been using the CAN bus for a while, and there are multiple options to add more axis motors, tool heads, and distribute the CAN bus and power cords to multiple expansion boards.

Let me check if anyone has already released this, because when something is "new" and is already in commercial production at the same time, it's interesting...

There is one difference: commercial products are closed source. This is an open project, anyone can implement it without having to pay Duet3D first. It's a bit like printing on conveyor belts has existed in commercial products for decades, but we are only now seeing it very common because of the expiration of patents. You may have noticed that this is Hack-a-Day, not Buy-a-Day. If buying commercial products is more fun than building things, go back to Amazon.

Duet3D is closed, are you sure? Duet itself is open, why should they close it?

Even after the above rant about it being closed source, it is not closed source.

From the license file: "This source describes open hardware and is licensed under "CERN-OHL-S v2" or any later version and the "Additional Duet3D License Terms" outlined below, including any future updates."

https://github.com/Duet3D/Duet3-Mainboard-6HC

That is totally wrong! All duo software and hardware are open source. Even using kicad files.

Here are the devil’s supporters. Read Josh’s comments carefully. This is not to say that he suggests that business solutions are more interesting or worthy of publishing an article, but that it is dishonest to call them "new" when they are not actually new. of. Advocates against the devil, this is still a new concept applicable to open source design, so it is worth considering whether there is a commercial/closed source implementation.

Duet and Huvud and TurboCAN are all open implementations of the same concept. So this is not new in any shape or form. Huvud board can work via USB instead of CAN, suitable for people like me who don't like old car dinosaurs.

As for whether it is worth posting - not an authority in this regard. I don't mind reading it.

The development board and firmware of Duet3D are open source. https://duet3d.dozuki.com/Wiki/Contributing_to_firmware_development As for commercial products, the same is true for PandaCAN.

The conveyor belt printer's patent is still in effect. This is why all the products you see in production are at a 45* angle to the bed. This defeated existing patents.

Using ESP32, people can reduce wires to only power supply and wireless communication...

You may experience delays, especially when limit switches are installed on the tool head. But in any case, this is an idea worth studying.

Given that the (most normal) 3D printer has a strictly defined build area, I am curious whether it is feasible to use a good, old-fashioned IR:

You may need to arrange multiple transmitters around the bed so that you can place the receiver on the head assembly you like without risking the receiver moving away from the transmitter or being blocked by system components; but this is all Static wiring does not affect moving parts, so the risk of strain/repetitive bending/etc is much lower. damage.

The data rate will not be very high; but compared to running some protocols through wifi and then decoding them into peripheral control signals, the LED to photodiode is very, very simple; so it seems feasible to reduce the delay; for a small number of motors and For the use case of the heater sending time-critical control signals, the bandwidth between 1-10mb/s is almost not insufficient; and it receives some temperature and position feedback that are not so strict on time.

Heater and fan control can be implemented locally, without a lot of actual interaction other than the temperature set point. Motors are almost the only thing that is time-critical, but even at a high level, you do worry about feedrate, stopping, and retracting.

An IRDA transceiver can realize all logic level signals of the driver/receiver and IR components. The serial ports of most 32-bit microcontrollers have IRDA mode. If not, there are IRDA encoder/decoder chips from Microchip, TI, etc.

As for the wires, in the era of dot matrix printers, this is a solved problem...

Using the microcontroller on both ends, you can pass the OOKd UART through the power supply (I'm waiting for someone to say "just return the current through the frame" or other terrible things).

However, the whole problem is that reducing the "number of wires" is kind of meaningless. Just prepare a flexible jacket of the right size, there is no difference between six or seven wires and one wire.

When you start looking at things like interchangeable heads, multiple extruders, etc., wires will increase rapidly. There are 30 wires on the head of the hot end of my prototype mix...I have seen I2C, but this is only because there is no ADC in my b. However, what you said is true. All these wires traveled through a loom and bounced around my printer happily for 3 years, and now there are no problems.

Also on a printer like Voron, the print head moves so fast that the cable insulation will dissolve after a few months of use in the cable chain. Reducing the number of wires is a real benefit.

That's because you are using the wrong cable. Voron or similar devices should use continuous motion or robotic cables for moving components. I can get an 18/12 long-life continuous motion cable from Mcmaster for 18.60 feet, which will stand up to anything Voron could do, and basically contain all the wires you want in one cable. The rated number of cycles is 20 million, and the bending radius is 3 inches.

@Xenocrates said: "I can get 18/12 long-life continuous motion cables from Mcmaster for 18.60 feet..." This is too expensive, even for continuous flexible 18/12 cables. For example, 1-99 feet of McMaster-Carr P/N 8082K22 PVC unshielded stranded 18-AWG 12 core continuous flexible cable costs $2.58 per foot. (Even this is expensive for me; supply chain + inflation is nonsense again?) Or am I missing something? look here:

https://www.mcmaster.com/8082K22/

https://www.mcmaster.com/cable/cable-awg~18-12/use-for~continuous-motion/

right. I have silicone cables (have not replaced them with HDPE or anything currently recommended). There was a real headache last week. My squeeze opportunity reached half of the pole in the stepper at a very specific point on the bed. It took me aaaages to solve it. Eventually it becomes the broken conductor in the complete silicone insulation part. Crazy production. If you use silicone cables 100%, it is recommended that you use silicone lubricant spray (pull out the magnetic construction surface first). A suitable multi-core cable will be smarter. Proper multi-core with only 4 conductors would be better. Super cool idea.

I am currently in the process of developing a wireless duet hub with MQTT for all my low-latency devices. Duet wirelessly sends the object model (change) to the external box running SBC, and MQTT forwards it to the esp32 connected to the 8-channel relay board, triggering all power devices. It's complicated, but it's worth the trouble when it's done. I have gone crazy with all these cables. When completed, it will wirelessly trigger the Coldend fan, nozzle cam LED, 2x chamber heater, solenoid valve for air, air itself, cross flow fan and bathroom fan. I am here to perform the task, this time it will be completed, all in one box :)

I mean, of course, non-low latency devices

Not sure if this is some well-designed irony, because I don't believe in the wireless value of low-latency precise operation.

Yes, after switching the relay on my dashboard, it sometimes takes 1 second to trigger. It will take some time. However, Hearters is not short of time.

For reference only: https://www.reddit.com/r/esp32/comments/qkwfph/ble_latency_and_optimization/

OP managed to delay ESP32 BLE from 2 milliseconds to 12.5 milliseconds.

thx, not bad. Let me see which connection is more stable, wifi or ble. I can't tell the ATM.

There are many CAN boards for 3D printers, such as HUVUD and TurboCAN. The problem is that the shortage of chips has a great impact on these, so availability is an issue.

No one is interested in the CAN bus system in 3D printing, because it is just another thing to configure (people like to plug in more things and configure the firmware file)

I disagree, because on the contrary: it is increasingly necessary to reduce the number of wires going into the printer tool head, especially on the DIY tool head—the Voron Afterburner tool head can insert up to 14 wires into its device for use in examples. More and more choices have proved that the demand exists, but the shortage of chips has caused a big blow, because the automotive industry needs a microcontroller that can execute CAN, and people just build 3D printers in their garages economically Can't compete with them.

Chips that can perform CANBus and are in line with automotive uses (antistatic, temperature range, etc.) and manufacturers promise to produce chips that run for ten years or more are sought after by automotive manufacturers.

This is a planned feature of Smothieboard v2 (the specification many years ago: goo.gl/dOjHhX), but it was deleted in order to simplify the first revision.

Now, we plan to explore compatibility with the Duet CAN system (if it is designed well enough), and then once we do, we will continue to design our own tools on this basis.

That was after the v2 board went into production.

To be honest, I prefer USB3 systems to CANBUS. Now, in some cases, what can USB-PD provide...120w? It will be very suitable for the kind of use we currently have, with hot-swappable features, and also allows the hub to be placed at the end of the endpoint for checking cameras, etc.

I think the idea behind the CAN bus on Duet is too narrow, and we can do better. Klipper has allowed multiple microcontrollers to coordinate with each other, it only needs the ability to enumerate endpoints and tool heads.

Duet is very troublesome to set up-the newly created M code has no damn meaning in half of the time, and scalability is not so easy, because they have decided that the configuration should be completely separated from everything else.

I have been studying such systems in my spare time, I just don't have cycles or programming experience to properly contribute to the ecosystem. I would never use Duet boards, their features are incredibly over-engineered and they are too complicated to set up. Damn it, the Duet team will not give you a simple SD card mirroring brush. They say "Go to X github to download these folders, then go to Y github to download these folders, and then put the Z folder in the root directory of Q Y folder, and voila, your Duet 3 may start now."

CAN has some useful functions, but USB3 is not easy to do. Such as only two wires, automatic message prioritization, short circuit/open circuit detection on the bus, high noise tolerance, message broadcasting, multiple nodes on the same link, and ease of use on many microcontrollers. There are also disadvantages, such as low data rates (250Kbit to 5Mbit) and termination requirements. It also doesn't have any confusing USB-PD :)

Your husband just made me happy: P...emphasize the "possible start-up part" I am a technician by nature, honestly, as you said, they really won't make you easy. As a newbie to the ecosystem, it took me a whole week to get started... even the direct micro with daughter boards and firmware (like grbl) makes more sense to me because of the duo stuff. I really like the network connection and the interface, but really... it costs a lot. Back to the topic at hand, if you have to add electronics to each endpoint anyway, you can also use something completely new, such as a 2-wire combination data and power cord or a command queue system with timing pulses to synchronize all components.

Sorry, this is too complicated for you.

My experience is much better:

First time: I go to the RRF Configurator, enter my configuration (or, if I only want to change some content, upload my existing .json file) to create the configuration, download the .zip file and upload it to My printer interface. The system decompresses, installs and restarts.

To run the update, I downloaded the .zip file from the forum/github, uploaded it using the web interface, and everything was installed and restarted.

For old embedded system developers like me, this is very clever.

The system will automatically update the motherboard, LCD and all tool boards, so it is a complete system update.

In any case, I believe you have something simpler to meet your needs, and it is great.

Compared with USB, Canbus is low-level and low-latency. It is widely used in automotive and industrial applications in automation, robotics, and reliable communications for a reason.

This idea certainly has some appeal, especially if you have a lot of equipment on your end effector. Mine is just a fan + heater + thermistor, and the resulting hot end is too light, so that I don't even want to add a small PCB to it.

But I think the disadvantages of running a bundle of wires are a bit exaggerated. I actually have an extra pair of conductors running, just because the ribbon cable was convenient when I built it. In any case, I think most of the failures will not happen to the length of the cable... My wires are fixed to the Teflon filament tube (Bowden) with zippers, which can prevent bending or pinching. To the cable. According to my imagination and what I have read, the real danger comes from the vibration (or obstacle?) damage of the connector or mounting part (especially the thermistor popping out). This doesn't seem to solve the problem at all, because there are still local connectors and wires from the PCB to the components.

One way this might become really compelling is if the entire hot end can be assembled directly on the PCB... It’s hard to imagine how to physically arrange this thing so that the heater, thermistor, and fan can all be directly/permanently Align the mechanical connection with the PCB...not to mention the extruder and bed sensor. Not sure it would be great to have a heater near it. But if this is the case, that would be great! In any case, if this happens, then it's time to start working hard to reduce the number of wires in the umbilical cord. Otherwise, I don't think it matters...the potential shortcomings still exist.

This idea has its advantages, but it creates new challenges for hosting electronic equipment in a heating chamber. Electronic products don't like heat, so if you use a higher temperature plastic for printing, the CAN bus on the hot end will die faster.

Both the CAN bus and the microcontroller can be used in the mil temperature range (up to 125C).

If you need, there is also a radiation-resistant CPU. Don't worry, we have already provided you with protection.

How to spot a good hacker: They do it because they can.

When CAN was first introduced into cars, I thought it was a good idea-it could simplify the wiring of cars and "increase" reliability-those pesky wires sometimes break. But after playing with CAN bus cars for decades, I can appreciate some of the advantages it brings, but replace some simple wires with a lot of complicated overhead. Simply adding Bluetooth to my car radio now requires more wires, a microcontroller, a CAN controller, a line driver, more connectors, a bunch of code, and a bunch of other development tools.

It increases the number of points of failure and exceeds the cost of a few copper strips.

I like it because it is fun, but the improvement of the system is not proportional to the increase in complexity.

Just because we can don’t mean we should

That is, more manufacturers become clumsy and use the highly integrated features of canbus to fundamentally build a walled garden. This is why DRM and copy protection of firmware and operating systems are the biggest BS.

Therefore, instead of letting one component be damaged by wire damage, can we stop the entire hot end due to the same failure? How can this be improved?

Fewer wires means fewer failures.

In addition, running the analog signal for temperature sensing next to the PWM high current signal of the extruder heater is not suitable for a good and reliable system design.

However, I do agree with this. These boards actually add more components, because everything now requires a CAN bus transceiver, its own miniature, and circuitry to support them. Very suitable for modularity, but more parts may fail. Therefore, I think they are very suitable for people who want to build their own printers, which may be a bit substandard... but not so good for people who want to sell printers.

I want to say that the biggest advantage is that the CAN bus means that you can now use quite long wires between nodes (large printers). CAN is very resistant to harsh environments, and the system becomes easy to expand, requiring more sensors Or you want to swap out the motor driver/motor and then you only need to swap/add a few modules. I think this also means that you can use almost anything (with CAN transceiver) as a very cool control unit.

Fewer wires also means less redundancy/flexibility. Compounding the problem is that using larger wire bundles creates a stronger frame for these wires. Using fewer wires may unintentionally cause more wire failures as they bend more and more frequently, causing hardening and breaking.

Again, apart from the obvious (over) engineering design issues that people get from the CAN bus, I don't think there is any advantage in this situation.

The fewer wires between point A and point B, the more cr*p. This adds a lot of complexity, throws microcontrollers and other electronic devices on the printer, and adds more points of failure.

Yes. If you experience a power surge for any reason (lightning once killed my modem), this will make troubleshooting and repair of all issues more difficult.

Fatal error: paragraph 2, line 5, word 6: missing if statement

About 9 years ago, I was considering building a CAN-based printer as a pre-heating for Sercos III-based printers/milling machines/lathes/all-in-ones. Sercos III runs on common Ethernet cables, can be used in a two-way ring topology, and can withstand uninterrupted (and possibly report) any cable breaks. It also carries 100 Mbps Ethernet, so each module can have its own web interface or file sharing for configuration. On the other hand, it requires more conductors than CAN and is not very popular. However, on the gripper, you can just use the commodity Ethernet jumper to connect to the head, if it is broken, you can wait until the printing is completed, and then replace it in a few seconds without having to repair it or construct a printing pause When using a new custom cable (or, more likely to restart printing after the repair). This may be especially useful if you frequently do long-run or other high-value printing, or if you are in mass production.

(There is also Sercos II, I have not studied it, but it is said to be similar in concept. It uses optical fiber communication, which may be more suitable for fast-moving 3D print heads...? There is also LIN, which, like CAN, Is it generally available in microcontrollers?)

Don't over-optimize your life!

I am surprised that no one mentioned Snapmakers, the system; I started using CAN BUS a few years ago; it provides plug-and-play 3D filament printing; CNC; laser engraving

If you know how to perform appropriate strain relief, this will be an unnecessary additional cost. Yes, I may have a lot of wires connected to the hot end, but I have also seen strange malfunctions in the CAN bus-based motorcycle system, when someone’s connector is not tightly connected-various error reports/self-diagnostics. The CAN bus is designed to handle high-noise environments-don't think my printer is qualified.

Now, on the other hand, the wiring of most printers is terrible. Fans get power and ground — 2 wires hot ends get power and ground — 2 wire layer fans get power and ground — 2 wires Since we are switching ground connections because of mosfet output, we can eliminate 2 power wires to start. And more depends on the other fans, sensors or decorations you add.

These are hobbyist machines-need to apply KISS-CANbus is excluded from my mind.

I hope that one day I can try to use Modbus and RS-485 for similar operations.

Is it still worth a try? I think CAN bus requires expensive chips, dedicated hardware, etc... Does CANbus have an advantage over Modbus? In addition to bandwidth? Anyway, 3d printers don't need that much bandwidth, right?

Please be kind and respectful to help make the comment section great. (Comment Policy)

This website uses Akismet to reduce spam. Learn how to handle your comment data.

By using our website and services, you explicitly agree to the placement of our performance, functionality and advertising cookies. Learn more